#include "drawtext.h"
#include <QPainter>
#include <QLabel>
#include "common.h"
//#include "setting/SysSetting/syssettingwidget.h"
void DrawText::drawText(QPainter *painter, const QRect &rectangle, int flags, const QString &text)
{
//    if(language==SysSettingWidget::LANGUAGE_PERSIAN)
//    {
//        QLabel lab;
//        lab.setFont(painter->font());
//        QPalette p;
//        p.setColor(QPalette::Window,Qt::transparent);
//        p.setColor(QPalette::WindowText,painter->pen().color());

//        lab.setPalette(p);
//        lab.setText(text);
//        lab.setAlignment((Qt::AlignmentFlag)flags);
//        lab.setGeometry(rectangle);
//        painter->drawPixmap(rectangle,QPixmap::grabWidget(&lab));
//    }
//    else
    {
        painter->drawText(rectangle,flags,text);
    }
}
